package action;

import entity.User;
import service.UserService;

public class LoginAction extends BasisAction{
	private String uid;
	private String pwd;
	
	public String execute(){
		UserService userService = new UserService();
		User user = userService.userLogin(uid, pwd);
		if (user!=null) {
			getMapRequest().put("uid", uid);
			return"success";
		}else{
			return"fail";
		}
	}
	
	public String getUid() {
		return uid;
	}
	public void setUid(String uid) {
		this.uid = uid;
	}
	public String getPwd() {
		return pwd;
	}
	public void setPwd(String pwd) {
		this.pwd = pwd;
	}
	
}
